#pragma once
#include <string>
#include "User.h"
#include "poker.h"

class User;
class Seat
{
public:
	Seat(){
		ready = false;
		pUser = NULL;
	}
	Seat(int _s){
		seatId = _s;
		ready = false;
		pUser = NULL;
	}
	~Seat(){}

	void setSeatId(int _s){
		seatId = _s;
	}

	bool isHaveUser(){
		return (pUser!=NULL);
	}

	bool isHavePoker(){
		return (pokers.getPokerNum()==0);
	}

	bool isReady(){
		return ready;
	}

	unsigned int getPokerNum(){
		return pokers.size();
	}

	void sit(User *_p){
		if( _p != NULL ){
			pUser = _p;
		}
	}

	void stand(){
		pUser = NULL;
		ready = false;
	}

	void initStartGame(){
		pokers.clear();
		ready = false;
	}

public:
	int seatId;
	User *pUser;
	pokerVec pokers;
	int role;//0:农民， 1、地主

	bool ready;
};

